#include <stdio.h>
#include <string.h>

int main( )
{
    bool markup;
    char data[ 1000 ];
    int i, j, t;
    markup = false;
    while ( gets( data ) )
    {
        for ( i = 0; i < strlen( data ); i++ )
        {
            if ( data[ i ] == '\\' && !markup )
            {
                i++;
                if ( data[ i ] == '\\' )
                    printf("\\");
                if ( data[ i ] == '*' )
                    markup = true;
                if ( data[ i ] != 'b' && data[ i ] != 'i'
                    && data[ i ] != 's' && data[ i ] != '*'
                        && data[ i ] != '\\' )
                    printf("%c", data[ i ]);
                if ( data[ i ] == 's' )
                {
                    t = 0;
                    for ( j = i + 1; ; j++ )
                    {
                        if ( data[ j ] == '.' )
                            t++;
                        else
                            if ( data[ j ] < '0' || data[ j ] > '9' )
                                break;
                        if ( t == 2 ) break;
                    }
                    j--;
                    i = j;
                }
            }
            else
            {
                if ( data[ i ] == '\\' && data[ i + 1 ] == '*' )
                {
                    markup = false;
                    i++;
                }
                else
                    printf("%c", data[ i ]);
            }
        }
        printf("\n");
    }
    return 0;
}
